<div bsModal #createOrEditModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal"
  aria-hidden="true" [config]="{backdrop: 'static'}">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <form *ngIf="active" #roleForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
        <div class="modal-header">
          <h4 class="modal-title">
            <span *ngIf="wl.id">编辑物流单</span>
            <span *ngIf="!wl.id">新建物流单</span>
          </h4>
          <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="col-md-3">
              <label>物资名称</label>
              <div class="form-group">
                <input #materialNameInput="ngModel" class="form-control" type="text" name="materialName"
                  [(ngModel)]="wl.materialName" required>
                  <validation-messages [formCtrl]="materialNameInput"></validation-messages>
              </div>
            </div>
            <div class="col-md-3">
              <label>炉批号</label>
              <div class="form-group">
                <input class="form-control" type="text" name="invFurBatch"
                  [(ngModel)]="wl.invFurBatch">
              </div>
            </div>
            <div class="col-md-3">
              <label>合格证号</label>
              <div class="form-group">
                <input class="form-control" type="text" name="hgzNo" [(ngModel)]="wl.hgzNo">
              </div>
            </div>
            <div class="col-md-3">
              <label>任务号</label>
              <div class="form-group">
                <input class="form-control" type="text" name="taskCode" [(ngModel)]="wl.taskCode">
              </div>
            </div>
          </div>

          <div class="row">
            <div class="col-md-3">
              <label>图号</label>
              <div class="form-group">
                <input class="form-control" type="text" name="drawingCode"
                  [(ngModel)]="wl.drawingCode">
              </div>
            </div>
            <div class="col-md-3">
              <label>物资编码</label>
              <div class="form-group">
                <input class="form-control" type="text" name="invCode" [(ngModel)]="wl.invCode">
              </div>
            </div>
            <div class="col-md-3">
              <label>型号名称</label>
              <div class="form-group">
                <input class="form-control" type="text" name="modelCode"
                  [(ngModel)]="wl.modelCode">
              </div>
            </div>
            <div class="col-md-3">
              <label>批次号</label>
              <div class="form-group">
                <input class="form-control" type="text" name="invBatch" [(ngModel)]="wl.invBatch">
              </div>
            </div>
          </div>

          <div class="row">
            <div class="col-md-3">
              <label>出库单号</label>
              <div class="form-group">
                <input #billNoInput="ngModel" class="form-control" type="text" name="billNo" [(ngModel)]="wl.billNo"
                  required>
                  <validation-messages [formCtrl]="billNoInput"></validation-messages>
              </div>
            </div>
            <div class="col-md-3">
              <label>型号牌号</label>
              <div class="form-group">
                <input class="form-control" type="text" name="invXhPhCpdh"
                  [(ngModel)]="wl.invXhPhCpdh">
              </div>
            </div>

            <div class="col-md-3">
              <label>尺寸</label>
              <div class="form-group">
                <input class="form-control" type="text" name="jcCc" [(ngModel)]="wl.jcCc">
              </div>
            </div>
            <div class="col-md-3">
              <label>规格</label>
              <div class="form-group">
                <input class="form-control" type="text" name="invScale" [(ngModel)]="wl.invScale">
              </div>
            </div>
          </div>

          <div class="row">
            <div class="col-md-3">
              <label>复验编号</label>
              <div class="form-group">
                <input class="form-control" type="text" name="hgz_zjd" [(ngModel)]="wl.hgz_zjd">
              </div>
            </div>
            <div class="col-md-3">
              <label>物资状态</label>
              <div class="form-group">
                <input class="form-control" type="text" name="invStatus"
                  [(ngModel)]="wl.invStatus">
              </div>

            </div>
            <div class="col-md-3">
              <label>计量单位</label>
              <div class="form-group">
                <input class="form-control" type="text" name="invMeasName"
                  [(ngModel)]="wl.invMeasName">
              </div>
            </div>
            <div class="col-md-3">
              <label>副计量单位</label>
              <div class="form-group">
                <input class="form-control" type="text" name="invDepMeasName"
                  [(ngModel)]="wl.invDepMeasName">
              </div>

            </div>
          </div>

          <div class="row">
            <div class="col-md-3">
              <label>实发数量/重量</label>
              <div class="form-group">
                <input #realNumInput="ngModel" class="form-control" type="number" min="0" name="realNum"
                  [(ngModel)]="wl.realNum" required>
                  <validation-messages [formCtrl]="realNumInput"></validation-messages>
              </div>
            </div>
            <div class="col-md-3">
              <label>实发件数</label>
              <div class="form-group">
                <input #realiteNumInput="ngModel" class="form-control" type="number" min="0" name="realiteNum"
                  [(ngModel)]="wl.realiteNum" required>
                  <validation-messages [formCtrl]="realiteNumInput"></validation-messages>
              </div>

            </div>
            <div class="col-md-3">
              <label>单价</label>
              <div class="form-group">
                <input #unitPriceInput="ngModel" class="form-control" type="number" min="0" name="unitPrice"
                  [(ngModel)]="wl.unitPrice" required>
                  <validation-messages [formCtrl]="unitPriceInput"></validation-messages>
              </div>
            </div>
            <div class="col-md-3">
              <label>总价</label>
              <div class="form-group">
                <input #totalPriceInput="ngModel" class="form-control" type="number" min="0" name="totalPrice"
                  [(ngModel)]="wl.totalPrice" required>
                  <validation-messages [formCtrl]="totalPriceInput"></validation-messages>
              </div>
            </div>
          </div>


          <div class="row">
            <div class="col-md-3">
              <label>扫描数量</label>
              <div class="form-group">
                <input class="form-control" type="number" min="0" name="scanQty" [(ngModel)]="wl.scanQty">
              </div>
            </div>
            <div class="col-md-3">
              <label>扫描时间</label>
              <div class="form-group">
                <input #scanTimePicker name="scanTime" class="form-control"
                  [ngModel]="wl.scanTime?(wl.scanTime | momentFormat:'YYYY年M月D日'): ''">
              </div>

            </div>
            <div class="col-md-3">
              <label>专料专用</label>
              <div class="form-group">
                <input class="form-control" type="text" name="zhuanYongStatus"
                  [(ngModel)]="wl.zhuanYongStatus">
              </div>
            </div>
            <div class="col-md-3">
              <label>单据日期</label>
              <div class="form-group">
                <input #billDatePicker name="billDate" class="form-control"
                  [ngModel]="wl.billDate?(wl.billDate | momentFormat:'YYYY年M月D日'): ''">
              </div>
            </div>
          </div>

          <div class="row">
            <div class="col-md-3">
              <label>技术状态</label>
              <div class="form-group">
                <input class="form-control" type="text" name="techCondition"
                  [(ngModel)]="wl.techCondition">
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-md-12">
              <label>备注</label>
              <div class="form-group">
                <input class="form-control" type="text" name="remark" [(ngModel)]="wl.remark">
              </div>
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button [disabled]="saving" type="button" class="btn btn-secondary" (click)="close()">{{l("Cancel")}}</button>
          <button type="submit" class="btn btn-primary" [disabled]="!roleForm.form.valid" [buttonBusy]="saving"
            [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>{{l("Save")}}</span></button>
        </div>

      </form>

    </div>
  </div>
</div>
